package server.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import server.model.entity.Shop;
import server.model.entity.ShopOrder;
import server.model.entity.Users;

import java.util.List;

/**
 * 创建人:    xvzhe
 * 创建时间:
 * 修改时间:
 * 版本:      v1.0
 */
public interface ShopOrderDao extends JpaRepository<ShopOrder, String> {
    List<ShopOrder> findByUsers_IdIn(List<String> userIds);

    List<ShopOrder> findByUsers_Id(String userIds);

    @Query(value = "select * from Shop_Order where DATE_FORMAT(create_time,'%Y-%m-%d') = ?1", nativeQuery = true)
    List<ShopOrder> findTime(String time);
}
